package com.company;

public class Main {

    public static void main(String[] args) {
	// write your code here
         dog D =new dog();
         D.eat();
         Animor a=new dog();
         a.eat();
         a.Show();
         a.test();
       System.out.println(((dog) a).name);
    }
}
class dog extends Animor{

    String name="杨幂";
    @Override
    public void eat(){
        System.out.println("狗是狗");
    }
    @Override
    public void Show(){
        System.out.println("展示方法修改版");
    }

    public static void test(){
        System.out.println("子类方法");
    }
}
class Animor{
    String name="baby";
    public void eat(){
        System.out.println("吃的方法");
    }
    public void Show(){
        System.out.println("展示方法");
    }
    public static void test(){
        System.out.println("父类方法");
    }
}